﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YOUYOU.Models.Entities.DBModels
{/// <summary>
 /// 生活方式自我管理记录表
 /// </summary>
    [SugarTable("management_lifestylemanag", TableDescription = "生活方式自我管理记录表")]
    public class ManagementLifestylemanag
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }
        /// <summary>
        /// 记录日期
        /// </summary>
        public DateTime? RecordDate { get; set; }
        /// <summary>
        /// 体质指数
        /// </summary>
        public double? Bodyindex { get; set; }
        /// <summary>
        /// 病人号
        /// </summary>
        public string? PatientId { get; set; }
        public string? DataMarker { get; set; }

        /// <summary>
        /// 目标体质指数
        /// </summary>
        public string? Targetbodyindex { get; set; }
        /// <summary>
        /// 目标体重
        /// </summary>
        public decimal? TargetWeight { get; set; }

        /// <summary>
        /// 血压测量时间
        /// </summary>
        public DateTime? Bloodressuredate { get; set; }
        /// <summary>
        /// 血压测量时间
        /// </summary>
        public DateTime? BloodSugarDate { get; set; }

        /// <summary>
        /// 目标腰围
        /// </summary>
        public string? Targetwaistline { get; set; }

        /// <summary>
        /// 目标血压
        /// </summary>
        public string? Targetbloodressure { get; set; }
        /// <summary>
        /// 心率
        /// </summary>
        public int? HeartRate { get; set; }

        /// <summary>
        /// 日抽烟量
        /// </summary>
        public string? Cigarettesmoking { get; set; }

        /// <summary>
        /// 饮酒量白酒（两）
        /// </summary>
        public string? Liquor { get; set; }

        /// <summary>
        /// 饮酒量啤酒（瓶）
        /// </summary>
        public string? Beer { get; set; }

        /// <summary>
        /// 饮酒量红酒（两）
        /// </summary>
        public string? Redwine { get; set; }

        /// <summary>
        /// 运动频次（几次/周）
        /// </summary>
        public string? motion { get; set; }

        /// <summary>
        /// 平均运动时长分钟/次
        /// </summary>
        public string? Averageduration { get; set; }

        /// <summary>
        /// 生活方式自我管理录入人
        /// </summary>
        public string? Entrant { get; set; }

        /// <summary>
        /// 生活方式自我管理录入时间
        /// </summary>
        public DateTime? Inputdate { get; set; }

        /// <summary>
        /// 生活方式自我管理最近修改人
        /// </summary>
        public string? Modifiedby { get; set; }

        /// <summary>
        /// 生活方式自我管理最近修改时间
        /// </summary>
        public DateTime? Revisedate { get; set; }

        /// <summary>
        /// 血压
        /// </summary>
        public string? BloodRessure { get; set; }

        /// <summary>
        /// 腰围
        /// </summary>
        public int? Waistline { get; set; }
        
        /// <summary>
        /// 空腹血糖 单位mmol/L
        /// </summary>
        public string? Bloodsugar { get; set; }
        

        /// <summary>
        /// 目标血糖
        /// </summary>
        public string? TargetBloodSugar { get; set; }
        /// <summary>
        /// 身高
        ///</summary>
        [SugarColumn(ColumnName = "Height")]
        public decimal Height { get; set; }
        /// <summary>
        /// 体重
        ///</summary>
        [SugarColumn(ColumnName = "Weight")]
        public decimal Weight { get; set; }
        /// <summary>
        /// 不良反应（1.无 2.有）
        ///</summary>
        [SugarColumn(ColumnName = "AdverseReaction")]
        public int? AdverseReaction { get; set; }
        /// <summary>
        /// 不良原因
        ///</summary>
        [SugarColumn(ColumnName = "BadCause")]
        public string? BadCause { get; set; }
        /// <summary>
        /// 鸡蛋（个）
        /// </summary>
        public float? Egg { get; set; }

        /// <summary>
        /// 牛奶（包）
        /// </summary>
        public float? Milk { get; set; }

        /// <summary>
        /// 坚果
        /// </summary>
        public string? Nut { get; set; }

        /// <summary>
        /// 水果
        /// </summary>
        public string? Fruit { get; set; }

        /// <summary>
        /// 咸菜
        /// </summary>
        public string? Pickles { get; set; }
        /// <summary>
        /// 早餐进餐时间
        /// </summary>
        public DateTime? BreakfastMealtimes { get; set; }

        /// <summary>
        /// 早餐主食
        /// </summary>
        public string? BreakfastStapleFood { get; set; }

        /// <summary>
        /// 早餐副食
        /// </summary>
        public string? BreakfastDeputyFood { get; set; }
        /// <summary>
        /// 午餐进餐时间
        /// </summary>
        public DateTime? LunchMealtimes { get; set; }

        /// <summary>
        /// 午餐主食
        /// </summary>
        public string? LunchStapleFood { get; set; }

        /// <summary>
        /// 午餐副食
        /// </summary>
        public string? LunchDeputyFood { get; set; }
        /// <summary>
        /// 晚餐进餐时间
        /// </summary>
        public DateTime? DinnerMealtimes { get; set; }

        /// <summary>
        /// 晚餐主食
        /// </summary>
        public string? DinnerStapleFood { get; set; }

        /// <summary>
        /// 晚餐副食
        /// </summary>
        public string? DinnerDeputyFood { get; set; }
        /// <summary>
        /// 分餐进餐时间
        /// </summary>
        public DateTime? EaSteparatelyMealtimes { get; set; }

        /// <summary>
        /// 分餐主食
        /// </summary>
        public string? EaSteparatelyStapleFood { get; set; }

        /// <summary>
        /// 分餐副食
        /// </summary>
        public string? EaSteparatelyDeputyFood { get; set; }
        /// <summary>
        /// 服药依从性（1.规律  2.间断  3.不服药）
        /// </summary>
        public int? MedicationCompliance { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(PatientId), nameof(SiftPrimaryScreening.Patientid))]
        public SiftPrimaryScreening? sift { get; set; }


        [Navigate(NavigateType.OneToOne, nameof(PatientId), nameof(RecordPatientrecords.PatientId))]
        public RecordPatientrecords? patient { get; set; }

    }

    public class ManagementLifestylemanagGw
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
        public int Id { get; set; }
        /// <summary>
        /// 记录日期
        /// </summary>
        public DateTime? RecordDate { get; set; }
        /// <summary>
        /// 体质指数
        /// </summary>
        public double? Bodyindex { get; set; }
        /// <summary>
        /// 病人号
        /// </summary>
        public string? PatientId { get; set; }
        public string? IdCard { get; set; }

        /// <summary>
        /// 目标体质指数
        /// </summary>
        public string? Targetbodyindex { get; set; }
        /// <summary>
        /// 目标体重
        /// </summary>
        public decimal? TargetWeight { get; set; }

        /// <summary>
        /// 血压测量时间
        /// </summary>
        public DateTime? Bloodressuredate { get; set; }
        /// <summary>
        /// 血压测量时间
        /// </summary>
        public string? BloodSugarDate { get; set; }

        /// <summary>
        /// 目标腰围
        /// </summary>
        public string? Targetwaistline { get; set; }

        /// <summary>
        /// 目标血压
        /// </summary>
        public string? Targetbloodressure { get; set; }
        /// <summary>
        /// 心率
        /// </summary>
        public int? HeartRate { get; set; }

        /// <summary>
        /// 日抽烟量
        /// </summary>
        public string? Cigarettesmoking { get; set; }

        /// <summary>
        /// 饮酒量白酒（两）
        /// </summary>
        public string? Liquor { get; set; }

        /// <summary>
        /// 饮酒量啤酒（瓶）
        /// </summary>
        public string? Beer { get; set; }

        /// <summary>
        /// 饮酒量红酒（两）
        /// </summary>
        public string? Redwine { get; set; }

        /// <summary>
        /// 运动频次（几次/周）
        /// </summary>
        public string? motion { get; set; }

        /// <summary>
        /// 平均运动时长分钟/次
        /// </summary>
        public string? Averageduration { get; set; }

        /// <summary>
        /// 生活方式自我管理录入人
        /// </summary>
        public string? Entrant { get; set; }

        /// <summary>
        /// 生活方式自我管理录入时间
        /// </summary>
        public string? Inputdate { get; set; }

        /// <summary>
        /// 生活方式自我管理最近修改人
        /// </summary>
        public string? Modifiedby { get; set; }

        /// <summary>
        /// 生活方式自我管理最近修改时间
        /// </summary>
        public string? Revisedate { get; set; }

        /// <summary>
        /// 血压
        /// </summary>
        public string? BloodRessure { get; set; }

        /// <summary>
        /// 腰围
        /// </summary>
        public int? Waistline { get; set; }

        /// <summary>
        /// 空腹血糖 单位mmol/L
        /// </summary>
        public string? Bloodsugar { get; set; }


        /// <summary>
        /// 目标血糖
        /// </summary>
        public string? TargetBloodSugar { get; set; }
        /// <summary>
        /// 身高
        ///</summary>
        [SugarColumn(ColumnName = "Height")]
        public decimal? Height { get; set; }
        /// <summary>
        /// 体重
        ///</summary>
        [SugarColumn(ColumnName = "Weight")]
        public decimal? Weight { get; set; }
        /// <summary>
        /// 不良反应（1.无 2.有）
        ///</summary>
        [SugarColumn(ColumnName = "AdverseReaction")]
        public int? AdverseReaction { get; set; }
        /// <summary>
        /// 不良原因
        ///</summary>
        [SugarColumn(ColumnName = "BadCause")]
        public string? BadCause { get; set; }
        /// <summary>
        /// 鸡蛋（个）
        /// </summary>
        public string? Egg { get; set; }

        /// <summary>
        /// 牛奶（包）
        /// </summary>
        public string? Milk { get; set; }

        /// <summary>
        /// 坚果
        /// </summary>
        public string? Nut { get; set; }

        /// <summary>
        /// 水果
        /// </summary>
        public string? Fruit { get; set; }

        /// <summary>
        /// 咸菜
        /// </summary>
        public string? Pickles { get; set; }
        /// <summary>
        /// 早餐进餐时间
        /// </summary>
        public string? BreakfastMealtimes { get; set; }

        /// <summary>
        /// 早餐主食
        /// </summary>
        public string? BreakfastStapleFood { get; set; }

        /// <summary>
        /// 早餐副食
        /// </summary>
        public string? BreakfastDeputyFood { get; set; }
        /// <summary>
        /// 午餐进餐时间
        /// </summary>
        public string? LunchMealtimes { get; set; }

        /// <summary>
        /// 午餐主食
        /// </summary>
        public string? LunchStapleFood { get; set; }

        /// <summary>
        /// 午餐副食
        /// </summary>
        public string? LunchDeputyFood { get; set; }
        /// <summary>
        /// 晚餐进餐时间
        /// </summary>
        public string? DinnerMealtimes { get; set; }

        /// <summary>
        /// 晚餐主食
        /// </summary>
        public string? DinnerStapleFood { get; set; }

        /// <summary>
        /// 晚餐副食
        /// </summary>
        public string? DinnerDeputyFood { get; set; }
        /// <summary>
        /// 分餐进餐时间
        /// </summary>
        public string? EaSteparatelyMealtimes { get; set; }

        /// <summary>
        /// 分餐主食
        /// </summary>
        public string? EaSteparatelyStapleFood { get; set; }

        /// <summary>
        /// 分餐副食
        /// </summary>
        public string? EaSteparatelyDeputyFood { get; set; }
        /// <summary>
        /// 服药依从性（1.规律  2.间断  3.不服药）
        /// </summary>
        public int? MedicationCompliance { get; set; }

    }
}
